\(\int \frac {(h+i x)^2 (a+b \log (c (e+f x)))}{d e+d f x} \, dx\) [177]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 30, antiderivative size = 157 \[ \int \frac {(h+i x)^2 (a+b \log (c (e+f x)))}{d e+d f x} \, dx=-\frac {b (4 f h-3 e i+f i x)^2}{4 d f^3}-\frac {b (f h-e i)^2 \log ^2(e+f x)}{2 d f^3}+\frac {2 i (f h-e i) (e+f x) (a+b \log (c (e+f x)))}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}+\frac {(f h-e i)^2 \log (e+f x) (a+b \log (c (e+f x)))}{d f^3} \]

[Out]

-1/4*b*(f*i*x-3*e*i+4*f*h)^2/d/f^3-1/2*b*(-e*i+f*h)^2*ln(f*x+e)^2/d/f^3+2*i*(-e*i+f*h)*(f*x+e)*(a+b*ln(c*(f*x+
e)))/d/f^3+1/2*i^2*(f*x+e)^2*(a+b*ln(c*(f*x+e)))/d/f^3+(-e*i+f*h)^2*ln(f*x+e)*(a+b*ln(c*(f*x+e)))/d/f^3

Rubi [A] (verified)

Time = 0.19 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2458, 12, 45, 2372, 14, 2338} \[ \int \frac {(h+i x)^2 (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {(f h-e i)^2 \log (e+f x) (a+b \log (c (e+f x)))}{d f^3}+\frac {2 i (e+f x) (f h-e i) (a+b \log (c (e+f x)))}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}-\frac {b (-3 e i+4 f h+f i x)^2}{4 d f^3}-\frac {b (f h-e i)^2 \log ^2(e+f x)}{2 d f^3} \]

[In]

Int[((h + i*x)^2*(a + b*Log[c*(e + f*x)]))/(d*e + d*f*x),x]

[Out]

-1/4*(b*(4*f*h - 3*e*i + f*i*x)^2)/(d*f^3) - (b*(f*h - e*i)^2*Log[e + f*x]^2)/(2*d*f^3) + (2*i*(f*h - e*i)*(e
+ f*x)*(a + b*Log[c*(e + f*x)]))/(d*f^3) + (i^2*(e + f*x)^2*(a + b*Log[c*(e + f*x)]))/(2*d*f^3) + ((f*h - e*i)
^2*Log[e + f*x]*(a + b*Log[c*(e + f*x)]))/(d*f^3)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (\frac {f h-e i}{f}+\frac {i x}{f}\right )^2 (a+b \log (c x))}{d x} \, dx,x,e+f x\right )}{f} \\ & = \frac {\text {Subst}\left (\int \frac {\left (\frac {f h-e i}{f}+\frac {i x}{f}\right )^2 (a+b \log (c x))}{x} \, dx,x,e+f x\right )}{d f} \\ & = \frac {2 i (f h-e i) (e+f x) (a+b \log (c (e+f x)))}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}+\frac {(f h-e i)^2 \log (e+f x) (a+b \log (c (e+f x)))}{d f^3}-\frac {b \text {Subst}\left (\int \frac {i x (4 f h+i (-4 e+x))+2 (f h-e i)^2 \log (x)}{2 f^2 x} \, dx,x,e+f x\right )}{d f} \\ & = \frac {2 i (f h-e i) (e+f x) (a+b \log (c (e+f x)))}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}+\frac {(f h-e i)^2 \log (e+f x) (a+b \log (c (e+f x)))}{d f^3}-\frac {b \text {Subst}\left (\int \frac {i x (4 f h+i (-4 e+x))+2 (f h-e i)^2 \log (x)}{x} \, dx,x,e+f x\right )}{2 d f^3} \\ & = \frac {2 i (f h-e i) (e+f x) (a+b \log (c (e+f x)))}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}+\frac {(f h-e i)^2 \log (e+f x) (a+b \log (c (e+f x)))}{d f^3}-\frac {b \text {Subst}\left (\int \left (-i (-4 f h+4 e i-i x)+\frac {2 (f h-e i)^2 \log (x)}{x}\right ) \, dx,x,e+f x\right )}{2 d f^3} \\ & = -\frac {b (4 f h-3 e i+f i x)^2}{4 d f^3}+\frac {2 i (f h-e i) (e+f x) (a+b \log (c (e+f x)))}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}+\frac {(f h-e i)^2 \log (e+f x) (a+b \log (c (e+f x)))}{d f^3}-\frac {\left (b (f h-e i)^2\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,e+f x\right )}{d f^3} \\ & = -\frac {b (4 f h-3 e i+f i x)^2}{4 d f^3}-\frac {b (f h-e i)^2 \log ^2(e+f x)}{2 d f^3}+\frac {2 i (f h-e i) (e+f x) (a+b \log (c (e+f x)))}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}+\frac {(f h-e i)^2 \log (e+f x) (a+b \log (c (e+f x)))}{d f^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.36 \[ \int \frac {(h+i x)^2 (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {2 a^2 f^2 h^2-4 a^2 e f h i+2 a^2 e^2 i^2+8 a b f^2 h i x-8 b^2 f^2 h i x-4 a b e f i^2 x+6 b^2 e f i^2 x+2 a b f^2 i^2 x^2-b^2 f^2 i^2 x^2-2 b^2 e^2 i^2 \log (e+f x)+2 b \left (2 a (f h-e i)^2+b i \left (-2 e^2 i+e f (4 h-2 i x)+f^2 x (4 h+i x)\right )\right ) \log (c (e+f x))+2 b^2 (f h-e i)^2 \log ^2(c (e+f x))}{4 b d f^3} \]

[In]

Integrate[((h + i*x)^2*(a + b*Log[c*(e + f*x)]))/(d*e + d*f*x),x]

[Out]

(2*a^2*f^2*h^2 - 4*a^2*e*f*h*i + 2*a^2*e^2*i^2 + 8*a*b*f^2*h*i*x - 8*b^2*f^2*h*i*x - 4*a*b*e*f*i^2*x + 6*b^2*e
*f*i^2*x + 2*a*b*f^2*i^2*x^2 - b^2*f^2*i^2*x^2 - 2*b^2*e^2*i^2*Log[e + f*x] + 2*b*(2*a*(f*h - e*i)^2 + b*i*(-2
*e^2*i + e*f*(4*h - 2*i*x) + f^2*x*(4*h + i*x)))*Log[c*(e + f*x)] + 2*b^2*(f*h - e*i)^2*Log[c*(e + f*x)]^2)/(4
*b*d*f^3)

Maple [A] (verified)

Time = 0.65 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.29

method result size
norman \(\frac {\left (2 a \,e^{2} i^{2}-4 a e f h i +2 a \,f^{2} h^{2}-3 b \,e^{2} i^{2}+4 b e f h i \right ) \ln \left (c \left (f x +e \right )\right )}{2 d \,f^{3}}+\frac {b \left (e^{2} i^{2}-2 e f h i +f^{2} h^{2}\right ) \ln \left (c \left (f x +e \right )\right )^{2}}{2 d \,f^{3}}-\frac {i \left (2 a e i -4 a f h -3 b e i +4 b f h \right ) x}{2 d \,f^{2}}+\frac {i^{2} \left (2 a -b \right ) x^{2}}{4 d f}+\frac {b \,i^{2} x^{2} \ln \left (c \left (f x +e \right )\right )}{2 d f}-\frac {b i \left (e i -2 f h \right ) x \ln \left (c \left (f x +e \right )\right )}{d \,f^{2}}\) \(202\)
parts \(\frac {a \left (\frac {i \left (\frac {1}{2} f i \,x^{2}-x e i +2 x f h \right )}{f^{2}}+\frac {\left (e^{2} i^{2}-2 e f h i +f^{2} h^{2}\right ) \ln \left (f x +e \right )}{f^{3}}\right )}{d}+\frac {b \left (\frac {c \,e^{2} i^{2} \ln \left (c f x +c e \right )^{2}}{2 f^{2}}-\frac {c e h i \ln \left (c f x +c e \right )^{2}}{f}+\frac {c \,h^{2} \ln \left (c f x +c e \right )^{2}}{2}-\frac {2 e \,i^{2} \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f^{2}}+\frac {2 h i \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f}+\frac {i^{2} \left (\frac {\left (c f x +c e \right )^{2} \ln \left (c f x +c e \right )}{2}-\frac {\left (c f x +c e \right )^{2}}{4}\right )}{c \,f^{2}}\right )}{d c f}\) \(250\)
risch \(\frac {b \ln \left (c \left (f x +e \right )\right )^{2} e^{2} i^{2}}{2 d \,f^{3}}-\frac {b \ln \left (c \left (f x +e \right )\right )^{2} e h i}{d \,f^{2}}+\frac {b \ln \left (c \left (f x +e \right )\right )^{2} h^{2}}{2 d f}-\frac {b i x \left (-f i x +2 e i -4 f h \right ) \ln \left (c \left (f x +e \right )\right )}{2 d \,f^{2}}+\frac {a \,i^{2} x^{2}}{2 d f}-\frac {b \,i^{2} x^{2}}{4 d f}+\frac {\ln \left (f x +e \right ) a \,e^{2} i^{2}}{d \,f^{3}}-\frac {2 \ln \left (f x +e \right ) a e h i}{d \,f^{2}}+\frac {\ln \left (f x +e \right ) a \,h^{2}}{d f}-\frac {3 \ln \left (f x +e \right ) b \,e^{2} i^{2}}{2 d \,f^{3}}+\frac {2 \ln \left (f x +e \right ) b e h i}{d \,f^{2}}-\frac {a e \,i^{2} x}{d \,f^{2}}+\frac {2 a h i x}{d f}+\frac {3 b e \,i^{2} x}{2 d \,f^{2}}-\frac {2 b h i x}{d f}\) \(280\)
parallelrisch \(\frac {6 a \,e^{2} i^{2}-11 b \,e^{2} i^{2}-16 a e f h i +16 b e f h i -4 a e f \,i^{2} x +8 a \,f^{2} h i x +6 b e f \,i^{2} x -8 b \,f^{2} h i x +2 a \,f^{2} i^{2} x^{2}-b \,f^{2} i^{2} x^{2}-4 x \ln \left (c \left (f x +e \right )\right ) b e f \,i^{2}+8 x \ln \left (c \left (f x +e \right )\right ) b \,f^{2} h i -4 \ln \left (c \left (f x +e \right )\right )^{2} b e f h i -8 \ln \left (c \left (f x +e \right )\right ) a e f h i +8 \ln \left (c \left (f x +e \right )\right ) b e f h i +2 \ln \left (c \left (f x +e \right )\right )^{2} b \,e^{2} i^{2}+2 \ln \left (c \left (f x +e \right )\right )^{2} b \,f^{2} h^{2}+4 \ln \left (c \left (f x +e \right )\right ) a \,e^{2} i^{2}+4 \ln \left (c \left (f x +e \right )\right ) a \,f^{2} h^{2}-6 \ln \left (c \left (f x +e \right )\right ) b \,e^{2} i^{2}+2 x^{2} \ln \left (c \left (f x +e \right )\right ) b \,f^{2} i^{2}}{4 d \,f^{3}}\) \(292\)
derivativedivides \(\frac {\frac {c a \,e^{2} i^{2} \ln \left (c f x +c e \right )}{f^{2} d}-\frac {2 c a e h i \ln \left (c f x +c e \right )}{f d}+\frac {c a \,h^{2} \ln \left (c f x +c e \right )}{d}-\frac {2 a e \,i^{2} \left (c f x +c e \right )}{f^{2} d}+\frac {2 a h i \left (c f x +c e \right )}{f d}+\frac {a \,i^{2} \left (c f x +c e \right )^{2}}{2 c \,f^{2} d}+\frac {c b \,e^{2} i^{2} \ln \left (c f x +c e \right )^{2}}{2 f^{2} d}-\frac {c b e h i \ln \left (c f x +c e \right )^{2}}{f d}+\frac {c b \,h^{2} \ln \left (c f x +c e \right )^{2}}{2 d}-\frac {2 b e \,i^{2} \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f^{2} d}+\frac {2 b h i \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f d}+\frac {b \,i^{2} \left (\frac {\left (c f x +c e \right )^{2} \ln \left (c f x +c e \right )}{2}-\frac {\left (c f x +c e \right )^{2}}{4}\right )}{c \,f^{2} d}}{c f}\) \(338\)
default \(\frac {\frac {c a \,e^{2} i^{2} \ln \left (c f x +c e \right )}{f^{2} d}-\frac {2 c a e h i \ln \left (c f x +c e \right )}{f d}+\frac {c a \,h^{2} \ln \left (c f x +c e \right )}{d}-\frac {2 a e \,i^{2} \left (c f x +c e \right )}{f^{2} d}+\frac {2 a h i \left (c f x +c e \right )}{f d}+\frac {a \,i^{2} \left (c f x +c e \right )^{2}}{2 c \,f^{2} d}+\frac {c b \,e^{2} i^{2} \ln \left (c f x +c e \right )^{2}}{2 f^{2} d}-\frac {c b e h i \ln \left (c f x +c e \right )^{2}}{f d}+\frac {c b \,h^{2} \ln \left (c f x +c e \right )^{2}}{2 d}-\frac {2 b e \,i^{2} \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f^{2} d}+\frac {2 b h i \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f d}+\frac {b \,i^{2} \left (\frac {\left (c f x +c e \right )^{2} \ln \left (c f x +c e \right )}{2}-\frac {\left (c f x +c e \right )^{2}}{4}\right )}{c \,f^{2} d}}{c f}\) \(338\)

[In]

int((i*x+h)^2*(a+b*ln(c*(f*x+e)))/(d*f*x+d*e),x,method=_RETURNVERBOSE)

[Out]

1/2*(2*a*e^2*i^2-4*a*e*f*h*i+2*a*f^2*h^2-3*b*e^2*i^2+4*b*e*f*h*i)/d/f^3*ln(c*(f*x+e))+1/2*b*(e^2*i^2-2*e*f*h*i
+f^2*h^2)/d/f^3*ln(c*(f*x+e))^2-1/2*i*(2*a*e*i-4*a*f*h-3*b*e*i+4*b*f*h)/d/f^2*x+1/4*i^2*(2*a-b)/d/f*x^2+1/2*b*
i^2/d/f*x^2*ln(c*(f*x+e))-b*i*(e*i-2*f*h)/d/f^2*x*ln(c*(f*x+e))

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.08 \[ \int \frac {(h+i x)^2 (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {{\left (2 \, a - b\right )} f^{2} i^{2} x^{2} + 2 \, {\left (b f^{2} h^{2} - 2 \, b e f h i + b e^{2} i^{2}\right )} \log \left (c f x + c e\right )^{2} + 2 \, {\left (4 \, {\left (a - b\right )} f^{2} h i - {\left (2 \, a - 3 \, b\right )} e f i^{2}\right )} x + 2 \, {\left (b f^{2} i^{2} x^{2} + 2 \, a f^{2} h^{2} - 4 \, {\left (a - b\right )} e f h i + {\left (2 \, a - 3 \, b\right )} e^{2} i^{2} + 2 \, {\left (2 \, b f^{2} h i - b e f i^{2}\right )} x\right )} \log \left (c f x + c e\right )}{4 \, d f^{3}} \]

[In]

integrate((i*x+h)^2*(a+b*log(c*(f*x+e)))/(d*f*x+d*e),x, algorithm="fricas")

[Out]

1/4*((2*a - b)*f^2*i^2*x^2 + 2*(b*f^2*h^2 - 2*b*e*f*h*i + b*e^2*i^2)*log(c*f*x + c*e)^2 + 2*(4*(a - b)*f^2*h*i
 - (2*a - 3*b)*e*f*i^2)*x + 2*(b*f^2*i^2*x^2 + 2*a*f^2*h^2 - 4*(a - b)*e*f*h*i + (2*a - 3*b)*e^2*i^2 + 2*(2*b*
f^2*h*i - b*e*f*i^2)*x)*log(c*f*x + c*e))/(d*f^3)

Sympy [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.44 \[ \int \frac {(h+i x)^2 (a+b \log (c (e+f x)))}{d e+d f x} \, dx=x^{2} \left (\frac {a i^{2}}{2 d f} - \frac {b i^{2}}{4 d f}\right ) + x \left (- \frac {a e i^{2}}{d f^{2}} + \frac {2 a h i}{d f} + \frac {3 b e i^{2}}{2 d f^{2}} - \frac {2 b h i}{d f}\right ) + \frac {\left (- 2 b e i^{2} x + 4 b f h i x + b f i^{2} x^{2}\right ) \log {\left (c \left (e + f x\right ) \right )}}{2 d f^{2}} + \frac {\left (b e^{2} i^{2} - 2 b e f h i + b f^{2} h^{2}\right ) \log {\left (c \left (e + f x\right ) \right )}^{2}}{2 d f^{3}} + \frac {\left (2 a e^{2} i^{2} - 4 a e f h i + 2 a f^{2} h^{2} - 3 b e^{2} i^{2} + 4 b e f h i\right ) \log {\left (e + f x \right )}}{2 d f^{3}} \]

[In]

integrate((i*x+h)**2*(a+b*ln(c*(f*x+e)))/(d*f*x+d*e),x)

[Out]

x**2*(a*i**2/(2*d*f) - b*i**2/(4*d*f)) + x*(-a*e*i**2/(d*f**2) + 2*a*h*i/(d*f) + 3*b*e*i**2/(2*d*f**2) - 2*b*h
*i/(d*f)) + (-2*b*e*i**2*x + 4*b*f*h*i*x + b*f*i**2*x**2)*log(c*(e + f*x))/(2*d*f**2) + (b*e**2*i**2 - 2*b*e*f
*h*i + b*f**2*h**2)*log(c*(e + f*x))**2/(2*d*f**3) + (2*a*e**2*i**2 - 4*a*e*f*h*i + 2*a*f**2*h**2 - 3*b*e**2*i
**2 + 4*b*e*f*h*i)*log(e + f*x)/(2*d*f**3)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 351 vs. \(2 (151) = 302\).

Time = 0.23 (sec) , antiderivative size = 351, normalized size of antiderivative = 2.24 \[ \int \frac {(h+i x)^2 (a+b \log (c (e+f x)))}{d e+d f x} \, dx=2 \, b h i {\left (\frac {x}{d f} - \frac {e \log \left (f x + e\right )}{d f^{2}}\right )} \log \left (c f x + c e\right ) + \frac {1}{2} \, b i^{2} {\left (\frac {2 \, e^{2} \log \left (f x + e\right )}{d f^{3}} + \frac {f x^{2} - 2 \, e x}{d f^{2}}\right )} \log \left (c f x + c e\right ) - \frac {1}{2} \, b h^{2} {\left (\frac {2 \, \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} - \frac {\log \left (f x + e\right )^{2} + 2 \, \log \left (f x + e\right ) \log \left (c\right )}{d f}\right )} + 2 \, a h i {\left (\frac {x}{d f} - \frac {e \log \left (f x + e\right )}{d f^{2}}\right )} + \frac {1}{2} \, a i^{2} {\left (\frac {2 \, e^{2} \log \left (f x + e\right )}{d f^{3}} + \frac {f x^{2} - 2 \, e x}{d f^{2}}\right )} + \frac {b h^{2} \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} + \frac {a h^{2} \log \left (d f x + d e\right )}{d f} + \frac {{\left (e \log \left (f x + e\right )^{2} - 2 \, f x + 2 \, e \log \left (f x + e\right )\right )} b h i}{d f^{2}} - \frac {{\left (f^{2} x^{2} + 2 \, e^{2} \log \left (f x + e\right )^{2} - 6 \, e f x + 6 \, e^{2} \log \left (f x + e\right )\right )} b i^{2}}{4 \, d f^{3}} \]

[In]

integrate((i*x+h)^2*(a+b*log(c*(f*x+e)))/(d*f*x+d*e),x, algorithm="maxima")

[Out]

2*b*h*i*(x/(d*f) - e*log(f*x + e)/(d*f^2))*log(c*f*x + c*e) + 1/2*b*i^2*(2*e^2*log(f*x + e)/(d*f^3) + (f*x^2 -
 2*e*x)/(d*f^2))*log(c*f*x + c*e) - 1/2*b*h^2*(2*log(c*f*x + c*e)*log(d*f*x + d*e)/(d*f) - (log(f*x + e)^2 + 2
*log(f*x + e)*log(c))/(d*f)) + 2*a*h*i*(x/(d*f) - e*log(f*x + e)/(d*f^2)) + 1/2*a*i^2*(2*e^2*log(f*x + e)/(d*f
^3) + (f*x^2 - 2*e*x)/(d*f^2)) + b*h^2*log(c*f*x + c*e)*log(d*f*x + d*e)/(d*f) + a*h^2*log(d*f*x + d*e)/(d*f)
+ (e*log(f*x + e)^2 - 2*f*x + 2*e*log(f*x + e))*b*h*i/(d*f^2) - 1/4*(f^2*x^2 + 2*e^2*log(f*x + e)^2 - 6*e*f*x
+ 6*e^2*log(f*x + e))*b*i^2/(d*f^3)

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.33 \[ \int \frac {(h+i x)^2 (a+b \log (c (e+f x)))}{d e+d f x} \, dx=\frac {1}{2} \, {\left (\frac {b i^{2} x^{2}}{d f} + \frac {2 \, {\left (2 \, b f h i - b e i^{2}\right )} x}{d f^{2}}\right )} \log \left (c f x + c e\right ) + \frac {{\left (2 \, a i^{2} - b i^{2}\right )} x^{2}}{4 \, d f} + \frac {{\left (4 \, a f h i - 4 \, b f h i - 2 \, a e i^{2} + 3 \, b e i^{2}\right )} x}{2 \, d f^{2}} + \frac {{\left (b f^{2} h^{2} - 2 \, b e f h i + b e^{2} i^{2}\right )} \log \left (c f x + c e\right )^{2}}{2 \, d f^{3}} + \frac {{\left (2 \, a f^{2} h^{2} - 4 \, a e f h i + 4 \, b e f h i + 2 \, a e^{2} i^{2} - 3 \, b e^{2} i^{2}\right )} \log \left (f x + e\right )}{2 \, d f^{3}} \]

[In]

integrate((i*x+h)^2*(a+b*log(c*(f*x+e)))/(d*f*x+d*e),x, algorithm="giac")

[Out]

1/2*(b*i^2*x^2/(d*f) + 2*(2*b*f*h*i - b*e*i^2)*x/(d*f^2))*log(c*f*x + c*e) + 1/4*(2*a*i^2 - b*i^2)*x^2/(d*f) +
 1/2*(4*a*f*h*i - 4*b*f*h*i - 2*a*e*i^2 + 3*b*e*i^2)*x/(d*f^2) + 1/2*(b*f^2*h^2 - 2*b*e*f*h*i + b*e^2*i^2)*log
(c*f*x + c*e)^2/(d*f^3) + 1/2*(2*a*f^2*h^2 - 4*a*e*f*h*i + 4*b*e*f*h*i + 2*a*e^2*i^2 - 3*b*e^2*i^2)*log(f*x +
e)/(d*f^3)

Mupad [B] (verification not implemented)

Time = 1.43 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.32 \[ \int \frac {(h+i x)^2 (a+b \log (c (e+f x)))}{d e+d f x} \, dx=x\,\left (\frac {i\,\left (2\,a\,f\,h+b\,e\,i-2\,b\,f\,h\right )}{d\,f^2}-\frac {e\,i^2\,\left (2\,a-b\right )}{2\,d\,f^2}\right )+f\,\ln \left (c\,\left (e+f\,x\right )\right )\,\left (\frac {b\,i^2\,x^2}{2\,d\,f^2}-\frac {b\,i\,x\,\left (e\,i-2\,f\,h\right )}{d\,f^3}\right )+\frac {\ln \left (e+f\,x\right )\,\left (2\,a\,e^2\,i^2+2\,a\,f^2\,h^2-3\,b\,e^2\,i^2-4\,a\,e\,f\,h\,i+4\,b\,e\,f\,h\,i\right )}{2\,d\,f^3}+\frac {b\,{\ln \left (c\,\left (e+f\,x\right )\right )}^2\,\left (e^2\,i^2-2\,e\,f\,h\,i+f^2\,h^2\right )}{2\,d\,f^3}+\frac {i^2\,x^2\,\left (2\,a-b\right )}{4\,d\,f} \]

[In]

int(((h + i*x)^2*(a + b*log(c*(e + f*x))))/(d*e + d*f*x),x)

[Out]

x*((i*(2*a*f*h + b*e*i - 2*b*f*h))/(d*f^2) - (e*i^2*(2*a - b))/(2*d*f^2)) + f*log(c*(e + f*x))*((b*i^2*x^2)/(2
*d*f^2) - (b*i*x*(e*i - 2*f*h))/(d*f^3)) + (log(e + f*x)*(2*a*e^2*i^2 + 2*a*f^2*h^2 - 3*b*e^2*i^2 - 4*a*e*f*h*
i + 4*b*e*f*h*i))/(2*d*f^3) + (b*log(c*(e + f*x))^2*(e^2*i^2 + f^2*h^2 - 2*e*f*h*i))/(2*d*f^3) + (i^2*x^2*(2*a
 - b))/(4*d*f)